* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3a5a40;
    --secondary-color: #a3b18a;
    --light-color: #dad7cd;
    --dark-color: #344e41;
    --accent-color: #588157;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.mode-selection {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: var(--dark-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--accent-color);
    color: white;
}

button.active {
    background-color: var(--primary-color);
    color: white;
}

.game-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.board-container {
    position: relative;
}

.board-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.file-labels, .rank-labels {
    display: flex;
    justify-content: space-around;
}

.file-labels {
    position: absolute;
    bottom: -25px;
    width: 100%;
}

.rank-labels {
    position: absolute;
    left: -25px;
    height: 100%;
    flex-direction: column;
}

.game-info {
    width: 300px;
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#status {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.captured-pieces {
    margin-bottom: 15px;
}

.white-captured, .black-captured {
    margin-bottom: 5px;
}

.move-history {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
    background-color: var(--light-color);
    padding: 10px;
    border-radius: 5px;
}

.move-history h3 {
    margin-bottom: 10px;
    text-align: center;
}

#moves {
    display: grid;
    grid-template-columns: auto auto;
    gap: 5px;
}

.controls {
    display: flex;
    justify-content: space-between;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.promotion-pieces {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.piece {
    width: 60px;
    height: 60px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 5px;
}

.piece:hover {
    border-color: var(--accent-color);
}

footer {
    text-align: center;
    margin-top: 50px;
    color: var(--dark-color);
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
        align-items: center;
    }
    
    .game-info {
        width: 100%;
        max-width: 400px;
    }
} 